import request from '@/utils/request'

// 获取权限列表
export function getPermissionListAPI() {
  return request({
    url: `/sys/permission`,
    method: 'GET'
  })
}
// 删除权限
export function delPermissionAPI(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}

// 修改权限
export function editPermissionAPI(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

// 新增权限
export function addPermissionAPI(data) {
  return request({
    url: `/sys/permission`,
    method: 'post',
    data
  })
}
// 获取权限点详情
export function getPermissionDetailAPI(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'get'
  })
}
